import http from '@/util/httpRequest.js'
export function menu(){
    return http({
        method:'get',
        url:'/sys/menu/_all'
    })
}

export function getChildAndSelfById(id){
    return http({
        method:'get',
        url:`/sys/menu/${id}`
    })
}

export function save(data){
    return http({
        method:'post',
        url:`/sys/menu/save`,
        data
    })
 }

 export function update(data){
    return http({
        method:'put',
        url:`/sys/menu`,
        data
    })
 }

 export function deleteById(id){
    return http({
        method:'delete',
        url:`/sys/menu/${id}`
    })
 }